import {Http} from '@/utils/http.js';
class User {
	
	
	constructor() {
	}
	
	
	
	static async login(param){
		// TODO 用户登录方法
		return await Http.request({
			url: "users/login",
			data: param,
			method: "POST",
		})
	}
	
	static async authToken(param){
		// TODO 用户登录方法
		return await Http.request({
			url: "users/authToken",
			data: param,
			method: "POST",
		})
	}
	
	static async loginForOther(param){
		// TODO 用户第三方登录
		return await Http.request({
			url: "users/loginForOther",
			data: param,
			method: "POST",
		})
	}
	
	static async logOut(param){
		// TODO 用户第三方登录
		return await Http.request({
			url: "users/logOut",
			data: param,
			method: "POST",
		})
	}
	
	static async attentionUser(param){
		// TODO 用户第三方登录
		return await Http.request({
			url: "attention/attentionUser",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async getUserInfo(param){
		return await Http.request({
			url: "users/findUserByUid",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async getAuthCode(param){
		return await Http.request({
			url: "users/getAuthCode",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async refreshAuthCode(param){
		return await Http.request({
			url: "users/refreshAuthCode",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async register(param){
		return await Http.request({
			url: "users/register",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async updateUserInfo(param){
		return await Http.request({
			url: "users/updateUserInfo",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
}

export {
	User
}
